package edu.seu.mart.dao.impl;



import edu.seu.mart.dao.IknowledgeSubDao;
import edu.seu.mart.dao.BaseDao;
import edu.seu.mart.model.KnowledgeSub;
import org.springframework.stereotype.Repository;

/**
 * Created by asus on 2015/3/20.
 */
@Repository
public class KnowledgeSubDao extends BaseDao<KnowledgeSub> implements IknowledgeSubDao {

    public String getKnowledgeSub(int knowdgeId){

       return this.list("from KnowledgeSub where pid='"+knowdgeId+"' order by rand() limit 0,1").get(0).getAnswer();
    }
}
